﻿<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
		<meta name="apple-mobile-web-app-title" content="思路广惠">
		<title>卡号管理</title>

		<meta content="telephone=no" name="format-detection" />

		<link rel="stylesheet" type="text/css" href="../../src/css/base.css?1.0" />
	</head>

	<body class="body-bg">
		<header class="header">
			<a href="javascript: history.back(-1)" class="head-le"><i class="iconfont icon-fanhui i2m"></i></a>
			<h1 class="header-txt">银行卡详情</h1>
		</header>
		<section class="top1rem s13m">
			<div class="setup-u flexs pad1rem">
				<img class="detail-img" src="../../src/images/zhaoshanglogo.png" />
				<div>
					<span id="bankDetail">查询中...</span>(<span id="bankAccount">6525</span>)
					<div>储蓄卡</div>
				</div>
			</div>
			<ul class="setup-u top1rem">
				<li class="setdetails huef36 setup-btm">设为默认</li>
				<li class="setdetails">删除卡片</li>
			</ul>

		</section>
		<script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
		<script src="//cdn.bootcss.com/layer/3.0.1/mobile/layer.js"></script>
		<script src="../../src/js/all.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var bankID = silks.getByVal("bankID");

			function getDetails(type, url, callback) {
				$.ajax({
					type: type,
					data: {
						MembersID: MembersID,
						MembersBankID: bankID,
						AppID: AppID,
						Token: Token
					},
					url: urls + url,
					success: callback
				});
			}

			getDetails("get", "/WorkMembersBank/GetMembersBankInfoByID", function(res) {
				if(res.Return_ID == 0) {
					var account = res.Return_Data.MembersBank_Account;
					$("#bankDetail").html(res.Return_Data.Bank_Name)
					$("#bankAccount").html(account.substr(account.length - 4, account.length))
				}
			});

			$(".setdetails").click(function() {
				if($(this).html() == "设为默认") {
					getDetails("get", "/WorkMembersBank/MembersBankDefault", function(res) {
						layers(res.Return_Mess);
					});
				} else {
					getDetails("post", "/WorkMembersBank/MembersBankDel", function(res) {
						layers(res.Return_Mess);
					});
				}
			});
		</script>
	</body>

</html>